package com.salelogistics.basic.service.impl;

import java.util.List;
import com.salelogistics.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.salelogistics.basic.mapper.BasVehicleInfoMapper;
import com.salelogistics.basic.domain.BasVehicleInfo;
import com.salelogistics.basic.service.IBasVehicleInfoService;

/**
 * 车辆信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-09
 */
@Service
public class BasVehicleInfoServiceImpl implements IBasVehicleInfoService 
{
    @Autowired
    private BasVehicleInfoMapper basVehicleInfoMapper;

    /**
     * 查询车辆信息
     * 
     * @param vehicleId 车辆信息主键
     * @return 车辆信息
     */
    @Override
    public BasVehicleInfo selectBasVehicleInfoByVehicleId(Long vehicleId)
    {
        return basVehicleInfoMapper.selectBasVehicleInfoByVehicleId(vehicleId);
    }

    /**
     * 查询车辆信息列表
     * 
     * @param basVehicleInfo 车辆信息
     * @return 车辆信息
     */
    @Override
    public List<BasVehicleInfo> selectBasVehicleInfoList(BasVehicleInfo basVehicleInfo)
    {
        return basVehicleInfoMapper.selectBasVehicleInfoList(basVehicleInfo);
    }

    /**
     * 新增车辆信息
     * 
     * @param basVehicleInfo 车辆信息
     * @return 结果
     */
    @Override
    public int insertBasVehicleInfo(BasVehicleInfo basVehicleInfo)
    {
        basVehicleInfo.setCreateTime(DateUtils.getNowDate());
        return basVehicleInfoMapper.insertBasVehicleInfo(basVehicleInfo);
    }

    /**
     * 修改车辆信息
     * 
     * @param basVehicleInfo 车辆信息
     * @return 结果
     */
    @Override
    public int updateBasVehicleInfo(BasVehicleInfo basVehicleInfo)
    {
        return basVehicleInfoMapper.updateBasVehicleInfo(basVehicleInfo);
    }

    /**
     * 批量删除车辆信息
     * 
     * @param vehicleIds 需要删除的车辆信息主键
     * @return 结果
     */
    @Override
    public int deleteBasVehicleInfoByVehicleIds(Long[] vehicleIds)
    {
        return basVehicleInfoMapper.deleteBasVehicleInfoByVehicleIds(vehicleIds);
    }

    /**
     * 删除车辆信息信息
     * 
     * @param vehicleId 车辆信息主键
     * @return 结果
     */
    @Override
    public int deleteBasVehicleInfoByVehicleId(Long vehicleId)
    {
        return basVehicleInfoMapper.deleteBasVehicleInfoByVehicleId(vehicleId);
    }
}
